<ul class="maintabmenu multipletabmenu">
    <li><a href="<?php echo base_url(); ?>administrator/members">Tất cả thành viên</a></li>
    <li class="current"><a href="">Cập nhật thành viên</a></li>    
</ul>
<div class="content">
    <?php if (isset($member) && $member != null) { ?>   
        <form action="" method="post" accept-charset="utf-8" id="members-form" class="stdform">
            <div class="edit-main">    
                <?php
                if ($this->session->flashdata('update_member_success')) {
                    ?>
                    <div class="notification msgsuccess">
                        <a class="close"></a>
                        <p>Cập nhật thành viên thành công.</p>
                    </div>
                <?php } else if ($this->session->flashdata('update_member_error')) { ?>
                    <div class="notification msgerror">
                        <a class="close"></a>
                        <p>Đã xảy ra lỗi.</p>
                    </div>
                <?php } ?>
                <input type="hidden" name="id" value="<?php echo $member->id;?>"/>
                <p><label>Tên thành viên:</label></p>
                <p><span class="field"><input class="longinput" name="name" type="text" value="<?php echo $member->name;?>"></span></p>
                <br>                            
                <p><label>Vị trí:</label></p>                            
                <p><span class="field"><input class="longinput" name="position" type="text" value="<?php echo $member->position;?>"></span></p>
                <br>
                <p><label>Facebook:</label></p>                            
                <p><span class="field"><input class="longinput" name="facebook" type="text" value="<?php echo $member->facebook;?>"></span></p>
                <br>
                <p><label>Skype:</label></p>                            
                <p><span class="field"><input class="longinput" name="skype" type="text" value="<?php echo $member->skype;?>"></span></p>
                <br>
                <p><label>Điện thoại:</label></p>                            
                <p><span class="field"><input class="longinput" name="phone" type="text" value="<?php echo $member->phone;?>"></span></p>
                <br>
                <p><label>Email:</label></p>                            
                <p><span class="field"><input class="longinput" name="email" type="text" value="<?php echo $member->email;?>"></span></p>
                <br>
                <p><label>Mô tả:</label></p>                            
                <p class="editor"><textarea name="description" id="editor_content"><?php echo $member->description;?></textarea></p>
                <br/>
            </div>
            <div class="edit-right">            
                <div class="widgetbox">
                    <div class="title"><h2 class="general"><span>Cập nhật thành viên</span></h2></div>
                    <div class="widgetcontent" style="display: block;">                                           
                        <br>
                        <p class="stdformbutton" style="margin-left: 0px;">
                            <button class="submit radius2">Cập nhật thành viên</button>
                            <input value="Hủy" class="reset radius2" type="reset">
                        </p>
                    </div><!--widgetcontent-->
                </div>            
                <div class="widgetbox">
                    <div class="title"><h2 class="general"><span>Ảnh đại diện</span></h2></div>
                    <div class="widgetcontent" style="display: block;">
                        <input id="featured_image" name="hdffeatured_image" type="hidden" value="<?php echo $member->image;?>"/>
                        <img src="<?php echo $member->image;?>" id="featured_image_src" style="margin-bottom:10px;" height="auto" width="100%">
                        <button id="imageUpload" class="submit radius2">Chọn ảnh đại diện</button>
                    </div>
                </div>
            </div>
        </form>    
    <?php } else { ?>
        <div class="notification msgalert">
            <a class="close"></a>
            <p>Không tồn tại thành viên này.</p>
        </div>
    <?php } ?>
</div>

<script>
    window.onload = function() {
        CKEDITOR.replace('description', {
            toolbar: 'standard',
            filebrowserBrowseUrl: '<?php echo base_url(); ?>elfinder/elfinder.html'
        });
    };
</script>
